package com.pojo;

import java.io.Serializable;
import java.util.List;

public class Product<Orders> implements Serializable {
        /**
         *
         */
        private Integer id;

        /**
         *
         */
        private String name;

        /**
         *
         */
        private Double price;

        public List<Orders> getOrders() {
            return orders;
        }

        public void setOrders(List<Orders> orders) {
            this.orders = orders;
        }

        private List<Orders> orders;

        private static final long serialVersionUID = 1L;

        /**
         *
         */
        public Integer getId() {
            return id;
        }

        /**
         *
         */
        public void setId(Integer id) {
            this.id = id;
        }

        /**
         *
         */
        public String getName() {
            return name;
        }

        /**
         *
         */
        public void setName(String name) {
            this.name = name;
        }

        /**
         *
         */
        public Double getPrice() {
            return price;
        }

        /**
         *
         */
        public void setPrice(Double price) {
            this.price = price;
        }

        @Override
        public boolean equals(Object that) {
            if (this == that) {
                return true;
            }
            if (that == null) {
                return false;
            }
            if (getClass() != that.getClass()) {
                return false;
            }
            Product other = (Product) that;
            return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                    && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
                    && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()));
        }

        @Override
        public int hashCode() {
            final int prime = 31;
            int result = 1;
            result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
            result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
            result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
            return result;
        }

        @Override
        public String toString() {
            StringBuilder sb = new StringBuilder();
            sb.append(getClass().getSimpleName());
            sb.append(" [");
            sb.append("Hash = ").append(hashCode());
            sb.append(", id=").append(id);
            sb.append(", name=").append(name);
            sb.append(", price=").append(price);
            sb.append(",orders=").append(orders);
            sb.append(", serialVersionUID=").append(serialVersionUID);
            sb.append("]");
            return sb.toString();
        }
    }

